package com.bl.student.dao.repository;

import com.bl.student.common.enums.ArtExamType;
import com.bl.student.dao.model.ArtExamEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * Created by liangweikang on 18/1/29.
 */
public interface ArtExamRespository extends PagingAndSortingRepository<ArtExamEntity, String> {

    Page<ArtExamEntity> findByTypeOrderByCreateTimeDesc(ArtExamType type, Pageable pageable);

    Page<ArtExamEntity> findByTypeOrderByWeightDesc(ArtExamType type, Pageable pageable);

}
